<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import ContentTypeEnum from '@/feature/fms/infra/constants/ContentTypeEnum'
import TitleTypeEnum from '@/feature/fms/infra/constants/TitleTypeEnum'
import InvoiceTypeEnum from '@/feature/fms/infra/constants/InvoiceTypeEnum'
import { invoiceTitleApi } from '@/feature/fms/infra/api/invoiceTitleApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: invoiceTitleApi,
        columns: [
          {
            label: '',
            prop: 'userId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: '开户银行',
            prop: 'bankName'
          },
          {
            label: '银行账号',
            prop: 'bankAccount'
          },
          {
            label: '注册地址',
            prop: 'registerAddress'
          },
          {
            label: '公司名称',
            prop: 'companyName'
          },
          {
            label: '注册电话',
            prop: 'registerTelephone'
          },
          {
            label: '发票内容',
            prop: 'contentType',
            type: ColumnType.RADIO,
            options: ContentTypeEnum
          },
          {
            label: '抬头类型',
            prop: 'titleType',
            type: ColumnType.RADIO,
            options: TitleTypeEnum
          },
          {
            label: '发票类型',
            prop: 'invoiceType',
            type: ColumnType.RADIO,
            options: InvoiceTypeEnum
          },
          {
            label: '收票人邮箱',
            prop: 'receiverEmail'
          },
          {
            label: '收票人手机',
            prop: 'receiverPhone'
          },
          {
            label: '个人名称',
            prop: 'userName'
          },
          {
            label: '纳税人识别码',
            prop: 'taxPayerNo'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

